package edu.sdwu.liqing.qasystem.util;

import com.google.common.collect.Maps;
import edu.sdwu.liqing.qasystem.entity.QaUser;

import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

public class TokenStoreUtil {

    private static ConcurrentHashMap<String, QaUser> tokenMap = new ConcurrentHashMap<>();

    //是否有效
    public static boolean isEffective(String token) {
        return Objects.nonNull(tokenMap.get(token));
    }


    public static void remove(String token) {
        tokenMap.remove(token);
    }

}
